import requests
import folium
import folium.plugins
from folium import Map, TileLayer
from pystac_client import Client
import pandas as pd
import matplotlib.pyplot as plt
import branca.colormap as cm
import geopandas
from pyproj import Geod
from shapely import wktEMIT Methane Point Source Plume Complexes
Daily aggregated, global point source methane emission plume estimates from the EMIT instrument on the International Space Station (ISS)
Approach
- Visualize obsereved masks of the ISS and target masks of detected plumes.
- Identify available dates and temporal frequency of observations for the given collection using the GHGC API
/stacendpoint. The collection processed in this notebook is the Earth Surface Mineral Dust Source Investigation (EMIT) methane emission plumes data product. - Pass the STAC item into the raster API
/stac/tilejson.jsonendpoint. - Using
folium.Map, visualize the plumes. - After the visualization, perform zonal statistics for a given polygon.
About the Data
The EMIT instrument builds upon NASA’s long history of developing advanced imaging spectrometers for new science and applications. EMIT launched to the International Space Station (ISS) on July 14, 2022. The data shows high-confidence research grade methane plumes from point source emitters - updated as they are identified - in keeping with JPL Open Science and Open Data policy.
Installing the Required Libraries
Required libraries are pre-installed on the GHG Center Hub. If you need to run this notebook elsewhere, please install them with this line in a code cell:
%pip install requests, folium, rasterstats, pystac_client, pandas, matplotlib
Querying the STAC API
Please run the next cell to import the required libraries.
Description about the geojson, target mask and permian basin
# ISS data coverage
coverage = geopandas.read_file('coverage.json')
# location where plume was detected
target_mask = geopandas.read_file('target_mask.json')
# Loading Permian Basin shape file as a region of interest
# User can pass any json or shape file here
permian_basin = geopandas.read_file('permian.zip')
# ISS area intersecting with permian basin
result_coverage = geopandas.clip(coverage, permian_basin)# Initializing a map with a center at [43, -100] and a zoom level of 4. The use of tiles = None has been employed to remove the default basemap.
m_ = folium.Map(location=[43, -100], zoom_start=4, tiles=None)
folium.TileLayer(tiles='https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}.png', name='ESRI World Imagery', attr='Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community',overlay='True').add_to(m_)
# Load other TileLayer from https://leaflet-extras.github.io/leaflet-providers/preview/
# From covergae.json fid, geometry has been selected
map_layer_target = folium.GeoJson(coverage[['fid', 'geometry']], name = 'ISS coverage').add_to(m_)
map_layer_target.add_to(m_)
map_layer_coverage = folium.GeoJson(target_mask, name = ' Target Mask').add_to(m_)
map_layer_coverage.add_to(m_)
# Layer control crates the toggle button for all the layers
folium.LayerControl(collapsed=False).add_to(m_)
m_Make this Notebook Trusted to load map: File -> Trust Notebook